package com.A;

import com.annotations.web.Controller;
import com.annotations.web.RequestMapping;
import com.annotations.web.RequestParam;
import com.constant.RequestMethod;
import com.proxy.JdkInvocationHandle;
import com.service.RpcService;
import lombok.extern.slf4j.Slf4j;

/**
 * @author linyu.dai
 * @project rpc
 * @description rpc调用
 * @creat 2022/11/30 21:44:26
 */
@Controller("/b")
@Slf4j
public class controller {

    @RequestMapping(url = "/test", method = {RequestMethod.GET})
    public String test(@RequestParam("a") String a){
        RpcService proxy = (RpcService) JdkInvocationHandle.getProxy(RpcService.class);
        String test = proxy.test(a);
        return test;
    }

}
